1. Field of the Invention
This invention relates to the field of computer graphics. More specifically, this invention relates to dithering methods for color computer display systems.
2. The Background Art
A computer""s display system allows one to receive a continuous visual display from the computer as it works. Because it gives one instant visual feedback, the display system makes the computer interactive. The display system also affects the speed of the computer. Computers use a number of different technologies in creating their displays and the choice determines what one sees, how sharply one sees it, and how quickly one sees it.
The predominant choices for seeing things that come from a computer today are the cathode ray tube (CRT) display and the flat panel liquid crystal display (LCD). The screen of the display is divided up into a systematic pattern of picture elements commonly called pixels. One pixel represents the smallest building block from which an image can be constructed on the display. The number that quantifies the possible sharpness of an image is called resolution. It indicates how many individual pixels an image contains across the width and height of the screen. Resolution is generally quantified as the number of pixels per horizontal line and the number of horizontal lines per screen. For example, a common computer display has a resolution of 1024xc3x97768.
A common way to construct an image to be displayed is to store an electronic representation of the image in a block of memory. Under some schemes, this is a dedicated block of memory referred to as graphic display memory. Under other schemes, the image is a stored in block of main memory. In either case, this block of memory is constantly being updated by the software in the computer and represents a time-slice of what is seen on the screen. This block of memory temporarily stores or buffers the changes in the image until it is read out as a complete image frame dozens of times per second. Because of this function, this block of memory is often called the frame buffer. Most applications write directly to the frame buffer rather than to the screen to achieve satisfactory performance.
For computer displays, each pixel of an image is commonly electronically represented by five numbers: the X coordinate on the display, the Y coordinate on the display, the red color component, the green color component, and the blue color component. The range of values possible for each of these numbers is limited by the number of bits used in the binary representation of the number. The values of the color components have both an integer and a fractional portion. It is common to refer to color computer display systems that use eight bits for the integer portion of the value of the color components as being xe2x80x9ctrue color.xe2x80x9d
The coloration of each pixel is determined by the combination of the values of the red, green, and blue color components. The intensity of the color of each pixel is determined by the individual values of the red, green, and blue color components. For example, to render a gray color, the red, green, and blue color components would each be set to the same value. To render a darker gray color, a lower value is used down to a minimum value which will render the color black. To render a lighter gray color, a higher value is used up to the maximum value which will render the color white.
The amount of memory required by the display system depends on two factors: the sharpness of the display image and the number of colors (or gray levels) that are to be displayed. Each increase in sharpness and number of colors means that the computer is putting more detail on the screen and storing more information in its display buffer. This results in longer processing times and/or higher hardware costs. Because of these potential drawbacks, many display systems do not operate using true color.
For instance, in certain scenarios the amount of memory allocated to each of the color components may be limited to four bits. Using four bits results in only sixteen unique color intensity values per color component. For example, the spectrum of colors from black to white will have sixteen steps in it. Unfortunately, this limited range of color intensities can result in unwanted artifacts. For example, at the border between two color values, a discontinuity is detected by the human eye that is known as a mach band.
To combat this artifact, conventional display systems add a noise component to random pixels. The same noise component is added to each of the color components of the selected random pixel. This has the effect of blurring the mach band so that it is less detectable by one""s eye. The addition of noise is known as dithering.
However, conventional dithering techniques can suffer from two drawbacks. First, if the dithering technique produces the addition of the same noise component to adjacent pixels, then other undesirable artifacts such as diagonal patterns or dimples may result. Second, if the dithering technique employs a look-up table or cascaded multiplexers, then the cost of the additional hardware may be too high.
Accordingly, it is an object of the present invention to minimize the undesirable artifacts of four bit resolution color computer display systems.
It is a further object of the present invention to minimize the hardware costs of four bit resolution color computer display systems.
These and many other objects and advantages of the present invention will become apparent to those of ordinary skill in the art from a consideration of the drawings and ensuing description of the invention.
A method and apparatus for dithering for color computer display systems includes the addition of a noise component to each of the color components of each pixel in a pseudo-random manner. The noise component is preferably different for each color component. Taking the image as a whole, the noise component repeats on a regular basis but is preferably selected so as not to repeat on adjacent pixels. The image is divided into squares of pixels and the same noise component is added to each of the same relative pixels from square to square. The preferred square of pixels is four pixels wide by four pixels high. The value of the noise component is chosen such that the most significant bit alternates both horizontally and vertically from pixel to pixel within the square of pixels. The other bits of the value of the noise component are preferably chosen such that the value of the noise component does not repeat within the square of pixels and such that a simplified hardware implementation is made possible by their selection. The resulting hardware implementation preferably consists of a number of exclusive-or gates tied together to produce the value of the noise component based on the least significant bits of the X and Y coordinates of each pixel. This hardware implementation is simple enough that it becomes economically practical to add a different noise component to each of the three color components of each pixel rather than the same noise component to all of the color components.